package com.itcanteen.medical.docker;

import org.junit.Test;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Demo {

    @Test
    public void demo() throws ParseException {
        Date date = new Date();
        String str="2020-12-14 10:51:14";

        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date zhiqinade = format.parse(str);

        System.out.println("当前时间："+date);
        System.out.println("解析出的时间"+zhiqinade);

        System.out.println(date.after(zhiqinade));
    }
}
